#include <gtest/gtest-param-test.h>
#include <gtest/gtest.h>

#include <tuple>

int add(const int a, const int b) { return a + b; }

class TestAdd : public testing::TestWithParam<std::tuple<int, int, int>> {};

TEST_P(TestAdd, Add) {
    const auto params = GetParam();
    SCOPED_TRACE("add(" + std::to_string(std::get<0>(params)) + ", " +
                 std::to_string(std::get<1>(params)) +
                 ") = " + std::to_string(std::get<2>(params)));
    EXPECT_EQ(add(std::get<0>(params), std::get<1>(params)),
              std::get<2>(params));
}

INSTANTIATE_TEST_SUITE_P(AddTestPrefix,
                         TestAdd,
                         testing::Values(std::make_tuple(1, 2, 3),
                                         std::make_tuple(-1, -2, -3),
                                         std::make_tuple(2, 3, 4)));